use cargo::ops;
-use cargo::util::{CliResult, CliError, Config, human};
+use cargo::util::{CliResult, CliError, Config, Human};
use cargo::util::important_paths::{find_root_manifest_for_cwd};
#[derive(RustcDecodable)]
None => Ok(None),
Some(err) => {
Err(match err.exit.as_ref().and_then(|e| e.code()) {
- Some(code) => {
- let desc = format!("Process finished with exit status {}", code);
- CliError::from_boxed(human(desc), code)
- }
+ Some(code) => CliError::from_error(Human(err), code),
None => CliError::from_error(err, 101),
})
}
assert_that(p.cargo_process("run"),
execs().with_status(2)
.with_stderr(&format!("\
-Process finished with exit status 2
+Process didn't exit successfully: `target[..]foo[..]` (exit code: 2)
",
)));
});
assert_that(p.cargo_process("run").arg("-v"),
execs().with_status(2)
.with_stderr(&format!("\
-Process finished with exit status 2
+Process didn't exit successfully: `target[..]foo[..]` (exit code: 2)
",
)));
});